package org.example.controller;

import org.example.domain.Order;
import org.example.service.OrderService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author TonySong
 * @date 2024/7/9 0009
 * @time 11:47
 */
@RestController
@RequestMapping("/orders")
public class OrderController {
    @Resource
    private OrderService orderService;
    @PostMapping("/pay")
    public Boolean  pay(@RequestBody Order order) {
       //根据商品生成订单:
        return  this.orderService.save(order);
    }
}
